package com.jochen.core.tools

import com.badlogic.gdx.math.Vector2

operator fun Vector2.plus(other: Vector2) = cpy().add(other)
operator fun Vector2.plus(value: Float) = cpy().add(value,value)

operator fun Vector2.minus(other: Vector2) = cpy().sub(other)
operator fun Vector2.minus(value: Float) = cpy().sub(value,value)

operator fun Vector2.times(other: Vector2) = cpy().scl(other)
operator fun Vector2.times(value: Float) = cpy().scl(value)
operator fun Vector2.unaryMinus() = Vector2(-x, -y)

operator fun Vector2.plusAssign(other: Vector2) { add(other) }
operator fun Vector2.plusAssign(value: Float) { add(value,value) }
operator fun Vector2.minusAssign(other: Vector2){ sub(other) }
operator fun Vector2.minusAssign(value: Float){ sub(value,value) }
operator fun Vector2.timesAssign(other: Vector2) { scl(other) }
operator fun Vector2.timesAssign(value: Float) { scl(value) }
